﻿//客服数组对象获取当前应该加载的客服的索引
var qqObj = [
  { name: '升本老师', qnum: '2852513681', tnum: '15327330433', znum: '15327330433' },
  { name: '升本信息', qnum: '2852513681', tnum: '15327330433', znum: '027-87449097' }
  // { name: '杜老师', qnum: '1191058693', tnum: '18162431486', znum: '18162431486' },
  // { name: '升本信息', qnum: '2852513681', tnum: '18162431486', znum: '18162431486' }
  //{ name: '升本中心', qnum: '2852513679', tnum: '15327330433', znum: '027-87449097' }
   
];
//获取当前应该加载的客服的索引
var indexT = function () {
    var myDate = new Date(),
        day = parseInt(myDate.getDate()),
        index = (day % 2 == 0) ? 0 : 0;//1为偶数天
    var xiaoshi = myDate.getHours();
   
 if (xiaoshi > 19 && xiaoshi < 24) {
        index = 0;
    }
    return 0;
    //return index;
}
var kfguin0 = qqObj[indexT()].qnum;//qq号码
var shoujihm0 = qqObj[indexT()].tnum;//手机号码
var laoshiname0 = qqObj[indexT()].name;//老师名字
var zuoji = qqObj[indexT()].znum;//座机

$(document).ready(function () {
    SchoolQQ_List(laoshiname0, kfguin0, shoujihm0, zuoji);
    var lxus1 = '<a href="http://www.hbzsb.cn/aboutus.aspx" target="_blank" class="check">点击了解详情</a>';
    lxus1 += ' <a href="http://wpa.qq.com/msgrd?V=1&uin=' + kfguin0 + '&Site=www.hbzsb.cn&Menu=yes" rel="nofollow" target="_blank" class="check" style=" background-color:#333;">' + zuoji + '</a>';
    var lxwm = "电话：" + zuoji + "," + shoujihm0 + " " + laoshiname0 + ' <a href="tencent://message/?uin=' + kfguin0 + '&Site=www.hbzsb.cn&menu=yes" target="_blank"><img border="0" height="16"  width="51" src=http://wpa.qq.com/pa?p=1:' + kfguin0 + ':10  />' + kfguin0 + '</a>';
    //
    $("#lxus111").html(lxus1);
    $("#lianxiwm").html(lxwm);
    $("#QQ_Span").empty().html("联系QQ:<br>" + QQurl2(0) + "(" + qqObj[0].name + ")<br>" + QQurl2(1) + "(" + qqObj[1].name + ")");
    $("#MQQ_LI").empty().html("<a href='" + QQurl() + "' style='text-decoration:none;'><img border=\"0\" class=\"ui-li-icon ui-corner-none\" height=\"16\" width=\"51\" src=\"http://wpa.qq.com/pa?p=1:" + qqObj[indexT()].qnum + ":10\" />&nbsp;" + qqObj[indexT()].qnum + "</a>").trigger('create');
    $("#MTEL_LI").empty().html("<a href='tel:" + qqObj[indexT()].znum.replace("-","") + "' style='text-decoration:none; '>" + qqObj[indexT()].znum + "</a>").trigger('create');
});
var kfguin = kfguin0;
var ws = "www.hbzsb.cn";
var shoujihm = shoujihm0;
var companyname = "在线咨询";
var welcomeword = "你好<brT>有什么要咨询" + laoshiname0 + "的吗?<brT>咨询电话:" + zuoji;
var online = new Array();
var urlroot = "http://www.hbzsb.cn/diaoyong/qqfdimg/";
var tOut = -1; var drag = false; var g_safeNode = null; lastScrollY = 0;
var type = 1;
if (kfguin) {
    rightDivHtml = '<div id="rightDiv" style="position:absolute; top:290px; right:1px;">';
    //rightDivHtml += kf_getPopupRightDivHtml(kfguin, ws, shoujihm);
    rightDivHtml += '</div>';
    document.write(rightDivHtml);
    if (type == 1 && kf_getCookie('hasshown') == 0)
    { companyname = companyname.substr(0, 15); welcomeword = kf_processWelcomeword(welcomeword); shoujihm = kf_getSafeHTML(shoujihm); kfguin = kf_getSafeHTML(kfguin); companyname = kf_getSafeHTML(companyname); welcomeword = welcomeword.replace(/<brT>/g, '\r\n'); welcomeword = kf_getSafeHTML(welcomeword); welcomeword = welcomeword.replace(/\r/g, "").replace(/\n/g, "<BR>"); window.setTimeout("kf_sleepShow()", 2000); }
    window.setTimeout("kf_moveWithScroll()", 1);
}


function floatHide() {
    $("#onlineService").animate({ width: "hide", opacity: "hide" }, "normal", function () {
        $("#onlineService").hide();
    });
    $("#floatShow").attr("style", "display:block");
    $("#floatHide").attr("style", "display:none");
    return false;
}
function floatShow() {
    $("#onlineService").animate({ width: "show", opacity: "show" }, "normal", function () {
        $("#onlineService").show();
    });
    $("#floatShow").attr("style", "display:none");
    $("#floatHide").attr("style", "display:block");
    return false;
}
function SchoolQQ_List(laoshiname0, kfguin0, shoujihm0, zuoji) {

    var _Htmlqq = "";
    var myDate = new Date();
    day = parseInt(myDate.getDate());
       // index = (day % 2 == 0) ? 1 : 0;//1为偶数天
    var _imgUrl = "/Templets/school/PX114qq/";
    _Htmlqq += "<style>*{margin:0;padding:0;list-style-type:none;}a,img{border:0;}#online_qq_tab a,.onlineMenu h3,.onlineMenu li.tli,.newpage{background:url(" + _imgUrl + "float_s.gif) no-repeat;}#onlineService,.onlineMenu,.btmbg{background:url(" + _imgUrl + "float_bg.gif) no-repeat;}#online_qq_layer{z-index:9999;position:fixed;right:0px;top:0;margin:10px 0 0 0;}*html,*html body{background-image:url(about:blank);background-attachment:fixed;}*html #online_qq_layer{position:absolute;top:expression(eval(document.documentElement.scrollTop));}#online_qq_tab{width:28px;float:left;margin:60px 0 0 0;position:relative;z-index:9;}#online_qq_tab a{display:block;height:118px;line-height:999em;overflow:hidden;}#online_qq_tab a#floatShow{background-position:-30px -374px;}#online_qq_tab a#floatHide{background-position:0 -374px;}#onlineService{display:inline;margin-left:-1px;float:left;width:130px;background-position:0 0;padding:10px 0 0 0;}.onlineMenu{background-position:-262px 0;background-repeat:repeat-y;padding:0 15px;}.onlineMenu h3{height:36px;line-height:999em;overflow:hidden;border-bottom:solid 1px #ACE5F9;}.onlineMenu h3.tQQ{background-position:0 10px; }.onlineMenu h3.tele{background-position:0 -47px;}.onlineMenu li{height:36px;line-height:36px;border-bottom:solid 1px #E6E5E4;text-align:center;}.onlineMenu li.tli{padding:0 0 0 29px;font-size:12px;text-align:left;}.onlineMenu li.zixun{background-position:0px -131px;}.onlineMenu li.fufei{background-position:0px -190px;}.onlineMenu li.phone{background-position:0px -244px;}.onlineMenu li a.newpage{display:block;height:36px;line-height:999em;overflow:hidden;background-position:5px -100px;}.onlineMenu li img{margin:8px 0 0 0;}.onlineMenu li.last{border:0;}.wyzx{padding:8px 0 0 5px;height:57px;overflow:hidden;background:url(" + _imgUrl + "webZx_bg.jpg) no-repeat;}.btmbg{height:12px;overflow:hidden;background-position:-131px 0;}</style>";
    _Htmlqq += '<div id="online_qq_layer">';
    _Htmlqq += '<div id="online_qq_tab" >';
    _Htmlqq += '<a id="floatShow" style="display:none;" title="展开" onclick="floatShow()" href="javascript:void(0);"></a><a id="floatHide" style="display:block;" onclick="floatHide()" title="隐藏" href="javascript:void(0);"></a></div>';
    _Htmlqq += '<div id="onlineService"">';// style="display:none;
    if (day % 2 == 0) {
        _Htmlqq += '<div class="onlineMenu"><h3 class="tQQ" ></h3><ul><li><a href="http://q.url.cn/s/hx1TQCm?_type=wpa" target="_blank"> <img border="0" height="16" alt="点击咨询" src="http://wpa.qq.com/pa?p=1:' + qqObj[1].qnum + ':4" width="23" /> ' + qqObj[1].name + '</a></li><li><a href="tencent://message/?uin=' + qqObj[0].qnum + '&Site=www.hbzsb.cn&menu=yes" target="_blank"> <img border="0" height="16" alt="点击咨询" src="http://wpa.qq.com/pa?p=1:' + qqObj[0].qnum + ':4" width="23" /> ' + qqObj[0].name + '</a></li></ul></div><div class="onlineMenu"><h3 class="tele"></h3><ul><li  title="点击咨询" style="padding:0 0 0 12px;overflow:hidden;color:red;font-weight:bold; font-size:12px; margin-left:-10px;">' + qqObj[1].znum + '</li><li class="last"><a class="newpage22"   title="点击咨询 " style="text-decoration:none; color:red; font-weight:bold;" href="javascript:void(0);">' + qqObj[0].znum + '</a></li></ul></div>';
    } else {
        //http://q.url.cn/s/IklcQCm?_type=wpa
        _Htmlqq += '<div class="onlineMenu"><h3 class="tQQ" ></h3><ul><li><a href="http://q.url.cn/s/IklcQCm?_type=wpa" target="_blank"> <img border="0" height="16" alt="点击咨询" src="http://wpa.qq.com/pa?p=1:' + qqObj[0].qnum + ':4" width="23" /> ' + qqObj[0].name + '</a></li><li><a href="tencent://message/?uin=' + qqObj[1].qnum + '&Site=www.hbzsb.cn&menu=yes" target="_blank"> <img border="0" height="16" alt="点击咨询" src="http://wpa.qq.com/pa?p=1:' + qqObj[1].qnum + ':4" width="23" /> ' + qqObj[1].name + '</a></li></ul></div><div class="onlineMenu"><h3 class="tele"></h3><ul><li  title="点击咨询" style="padding:0 0 0 12px;overflow:hidden;color:red;font-weight:bold; font-size:12px; margin-left:-10px;">' + qqObj[0].znum + '</li><li class="last"><a class="newpage22"   title="点击咨询 " style="text-decoration:none; color:red; font-weight:bold;" href="javascript:void(0);">' + qqObj[1].znum + '</a></li></ul></div>';
        //_Htmlqq += '<div class="onlineMenu"><h3 class="tQQ" ></h3><ul><li><a href="tencent://message/?uin=' + qqObj[0].qnum + '&Site=www.hbzsb.cn&menu=yes" target="_blank"> <img border="0" height="16" alt="点击咨询" src="http://wpa.qq.com/pa?p=1:' + qqObj[0].qnum + ':4" width="23" /> ' + qqObj[0].name + '</a></li><li><a href="tencent://message/?uin=' + qqObj[1].qnum + '&Site=www.hbzsb.cn&menu=yes" target="_blank"> <img border="0" height="16" alt="点击咨询" src="http://wpa.qq.com/pa?p=1:' + qqObj[1].qnum + ':4" width="23" /> ' + qqObj[1].name + '</a></li></ul></div><div class="onlineMenu"><h3 class="tele"></h3><ul><li  title="点击咨询" style="padding:0 0 0 12px;overflow:hidden;color:red;font-weight:bold; font-size:12px; margin-left:-10px;">' + qqObj[0].znum + '</li><li class="last"><a class="newpage22"   title="点击咨询 " style="text-decoration:none; color:red; font-weight:bold;" href="javascript:void(0);">' + qqObj[1].znum + '</a></li></ul></div>';
       }
    _Htmlqq += '<div class="btmbg"></div></div></div>';
    $("#QQlISTs").html(_Htmlqq);

}

function kf_getSafeHTML(s) {
    var html = ""; var safeNode = g_safeNode; if (!safeNode)
    { safeNode = document.createElement("TEXTAREA"); }
    if (safeNode)
    { safeNode.innerText = s; html = safeNode.innerHTML; safeNode.innerText = ""; g_safeNode = safeNode; }
    return html;
}
function kf_moveWithScroll() {
    if (typeof window.pageYOffset != 'undefined') { nowY = window.pageYOffset; }
    else if (typeof document.compatMode != 'undefined' && document.compatMode != 'BackCompat') { nowY = document.documentElement.scrollTop; }
    else if (typeof document.body != 'undefined') { nowY = document.body.scrollTop; }
    percent = .1 * (nowY - lastScrollY); if (percent > 0)
    { percent = Math.ceil(percent); }
    else
    { percent = Math.floor(percent); }
    document.getElementById("rightDiv").style.top = parseInt(document.getElementById("rightDiv").style.top) + percent + "px"; if (document.getElementById("kfpopupDiv"))
    { document.getElementById("kfpopupDiv").style.top = parseInt(document.getElementById("kfpopupDiv").style.top) + percent + "px"; }
    lastScrollY = lastScrollY + percent; tOut = window.setTimeout("kf_moveWithScroll()", 1);
}
function kf_hide() {
    floatShow();
    if (tOut != -1)
    { clearTimeout(tOut); tOut = -1; }
    document.getElementById("rightDiv").style.visibility = "hidden";
}

function kf_hidekfpopup() {
    floatShow();
    if (tOut != -1)
    { clearTimeout(tOut); tOut = -1; }
    document.getElementById("kfpopupDiv").style.visibility = "hidden"; tOut = window.setTimeout("kf_moveWithScroll()", 1);
}
function kf_getPopupDivHtml(kfguin, reference, companyname, welcomeword)
{
    var temp = '';
    temp += '<div style="float: left;height: 150px;width: 8px;background-image: url(' + urlroot + 'bg_1.gif);"></div>';
    temp += '<div style="font-family: Tahoma;text-align:left;float: left;height: 150px;width: 324px;background-image: url(' + urlroot + 'bg_2.gif);background-repeat: repeat-x;">';
    temp += '<div><h1 style=" float:left;font-size: 14px;color: #FFFFFF;margin: 0px;padding: 10px 0 13px 2px;line-height:17px;">' + companyname + '</h1><a href="#" onclick="kf_hidekfpopup();return false;" style="background-image: url(' + urlroot + 'close.gif);float: right;height: 19px;width: 42px;" onmouseover="javascript:this.style.backgroundPosition=\'bottom\'" onmouseleave="javascript:this.style.backgroundPosition=\'top\'"></a></div>';
    temp += '<div style="height:83px;padding: 0 0 0 2px;clear:both;">';
    temp += '<div style="background-image: url(' + urlroot + 'face.jpg);height: 70px;width: 70px;float:left;"></div>';
    temp += '<p style="font-family:Tahoma;font-size:12px;line-height:24px;width: 240px;margin:0px;padding: 0 0 0 12px;display:block;float:left;margin-top:2px;word-wrap:break-word;">' + welcomeword + '</p></div>';

    temp += '<div style="clear: both;">'; temp += '<a onclick="kf_hidekfpopup();return false;" href="#" style="float:right;background-image: url(' + urlroot + 'btn_1.gif);margin: 0 0 0 5px;padding: 0px;border:0px;height: 21px;width: 69px;"></a>';
    temp += '<a onclick="kf_openChatWindow(1)" href="#" style="float:right;background-image: url(' + urlroot + 'btn_2.gif);margin: 0px;padding: 0px;border:0px;height: 21px;width: 69px;"></a></div>';
    temp += '</div><div style="float: left;height: 150px;width: 8px;background-image: url(' + urlroot + 'bg_1.gif);background-position: right;"></div>';

    return temp;
}
function kf_getPopupRightDivHtml(kfguin, reference, shoujihm) {
    var temp = ""; temp += '<div class="wpa_popup" style="width:90px; height:150px;">'; temp += '<div style="width:8px; height:150px; float:left; background:url(' + urlroot + 'bg_1.gif);"></div>'; temp += '<div style="float:left; width:74px; height:150px; background:url(' + urlroot + 'middle.jpg); background-position: center;">'; temp += '<div ><h1 style="line-height:17px; font-size:10px; color:#FFF; margin:0px; padding:10px 0 13px 8px;">&nbsp;</h1></div>'; temp += '<div style="height:83px; padding:0 0 0 2px; clear:both;"><div style="width:70px; height:60px; float:left; background:url(' + urlroot + 'face.jpg);"></div><div  style=" font-size:12px;text-align:center;"><font color=red>' + shoujihm + '</font></div></div>'
    ; temp += '<div style="clear:both;"><script src="//wp.qiye.qq.com/qidian/2852067737/bc214a3d99281aca149493b168d32b9c" charset="utf-8"></script></div></div>'; temp += '<div style="width:8px; height:150px; float:left; background:url(' + urlroot + 'bg_1.gif) right;"></div></div>'; return temp;
}
function kf_openChatWindow(flag) {//
  
    window.open('http://q.url.cn/s/IklcQCm?_type=wpa', '_blank', 'height=544, width=644,toolbar=no,scrollbars=no,menubar=no,status=no'); if (flag == 1)
    { kf_hidekfpopup(); }
    return false;
}
function kf_validateWelcomeword(word) {
    var count = 0; for (var i = 0; i < word.length; i++) {
        if (word.charAt(i) == '\n')
        { count++; }
        if (count > 2)
        { return 2; }
    }
    if (word.length > 57 + 2 * count)
    { return 1; }
    count = 0; var temp = word.indexOf('\n'); while (temp != -1) {
        word = word.substr(temp + 1); if (temp - 1 <= 19)
        { count += 19; }
        else if (temp - 1 <= 38)
        { count += 38; }
        else if (temp - 1 <= 57)
        { count += 57; }
        temp = word.indexOf('\n');
    }
    count += word.length; if (count > 57)
    { return 3; }
    return 0;
}
function kf_processWelcomeword(word) {
    word = word.substr(0, 57 + 10); var result = ''; var count = 0; var temp = word.indexOf('<brT>'); while (count < 57 && temp != -1) {
        if (temp <= 19) {
            count += 19; if (count <= 57)
            { result += word.substr(0, temp + 5); }
            else
            { result += word.substr(0, 57 - count > word.length ? word.length : 57 - count); }
        }
        else if (temp <= 38) {
            count += 38; if (count <= 57)
            { result += word.substr(0, temp + 5); }
            else
            { result += word.substr(0, 57 - count > word.length ? word.length : 57 - count); }
        }
        else if (temp <= 57) {
            count += 57; if (count <= 57)
            { result += word.substr(0, temp + 5); }
            else
            { result += word.substr(0, 57 - count > word.length ? word.length : 57 - count); }
        }
        word = word.substr(temp + 5); temp = word.indexOf('<brT>');
    }
    if (count < 57)
    { result += word.substr(0, 57 - count > word.length ? word.length : 57 - count); }
    return result;
}
function kf_setCookie(name, value, exp, path, domain) {
    var nv = name + "=" + escape(value) + ";"; var d = null; if (typeof (exp) == "object")
    { d = exp; }
    else if (typeof (exp) == "number")
    { d = new Date(); d = new Date(d.getFullYear(), d.getMonth(), d.getDate(), d.getHours(), d.getMinutes() + exp, d.getSeconds(), d.getMilliseconds()); }
    if (d)
    { nv += "expires=" + d.toGMTString() + ";"; }
    if (!path)
    { nv += "path=/;"; }
    else if (typeof (path) == "string" && path != "")
    { nv += "path=" + path + ";"; }
    if (!domain && typeof (VS_COOKIEDM) != "undefined")
    { domain = VS_COOKIEDM; }
    if (typeof (domain) == "string" && domain != "")
    { nv += "domain=" + domain + ";"; }
    document.cookie = nv;
}
function kf_getCookie(name) {
    var value = ""; var cookies = document.cookie.split("; "); var nv; var i; for (i = 0; i < cookies.length; i++) {
        nv = cookies[i].split("="); if (nv && nv.length >= 2 && name == kf_rTrim(kf_lTrim(nv[0])))
        { value = unescape(nv[1]); }
    }
    return value;
}
function kf_sleepShow()
{ kf_setCookie('hasshown', 1, '', '/', 'bizapp.qq.com'); var position = parseInt(document.getElementById("rightDiv").style.top) + 10; popupDivHtml = '<div id="kfpopupDiv" onmousedown="MyMove.Move(\'kfpopupDiv\',event,1);"  style="z-index:10000;filter:alpha(opacity=90);position: absolute; top: ' + position + 'px; right: 500px;color:#000;font-size: 12px;cursor:move;height: 150px;width: 340px;">'; popupDivHtml += kf_getPopupDivHtml(kfguin, ws, companyname, welcomeword); popupDivHtml += '</div>'; document.body.insertAdjacentHTML("beforeEnd", popupDivHtml); }
function kf_dealErrors()
{ kf_hide(); return true; }
function kf_lTrim(str) {
    while (str.charAt(0) == " ")
    { str = str.slice(1); }
    return str;
}
function kf_rTrim(str) {
    var iLength = str.length; while (str.charAt(iLength - 1) == " ")
    { str = str.slice(0, iLength - 1); iLength--; }
    return str;
}
window.onerror = kf_dealErrors; var MyMove = new Tong_MoveDiv(); function Tong_MoveDiv() {
    this.Move = function (Id, Evt, T) {
        if (Id == "")
        { return; }
        var o = document.getElementById(Id); if (!o)
        { return; }
        evt = Evt ? Evt : window.event; o.style.position = "absolute"; o.style.zIndex = 200; var obj = evt.srcElement ? evt.srcElement : evt.target; var w = o.offsetWidth; var h = o.offsetHeight; var l = o.offsetLeft; var t = o.offsetTop; var div = document.createElement("DIV"); document.body.appendChild(div); div.style.cssText = "filter:alpha(Opacity=10,style=0);opacity:0.2;width:" + w + "px;height:" + h + "px;top:" + t + "px;left:" + l + "px;position:absolute;background:#000"; div.setAttribute("id", Id + "temp"); this.Move_OnlyMove(Id, evt, T);
    }
    this.Move_OnlyMove = function (Id, Evt, T) {
        var o = document.getElementById(Id + "temp"); if (!o)
        { return; }
        evt = Evt ? Evt : window.event; var relLeft = evt.clientX - o.offsetLeft; var relTop = evt.clientY - o.offsetTop; if (!window.captureEvents)
        { o.setCapture(); }
        else
        { window.captureEvents(Event.MOUSEMOVE | Event.MOUSEUP); }
        document.onmousemove = function (e) {
            if (!o)
            { return; }
            e = e ? e : window.event; var bh = Math.max(document.body.scrollHeight, document.body.clientHeight, document.body.offsetHeight, document.documentElement.scrollHeight, document.documentElement.clientHeight, document.documentElement.offsetHeight); var bw = Math.max(document.body.scrollWidth, document.body.clientWidth, document.body.offsetWidth, document.documentElement.scrollWidth, document.documentElement.clientWidth, document.documentElement.offsetWidth); var sbw = 0; if (document.body.scrollWidth < bw)
                sbw = document.body.scrollWidth; if (document.body.clientWidth < bw && sbw < document.body.clientWidth)
                    sbw = document.body.clientWidth; if (document.body.offsetWidth < bw && sbw < document.body.offsetWidth)
                        sbw = document.body.offsetWidth; if (document.documentElement.scrollWidth < bw && sbw < document.documentElement.scrollWidth)
                            sbw = document.documentElement.scrollWidth; if (document.documentElement.clientWidth < bw && sbw < document.documentElement.clientWidth)
                                sbw = document.documentElement.clientWidth; if (document.documentElement.offsetWidth < bw && sbw < document.documentElement.offsetWidth)
                                    sbw = document.documentElement.offsetWidth; if (e.clientX - relLeft <= 0)
                                    { o.style.left = 0 + "px"; }
                                    else if (e.clientX - relLeft >= bw - o.offsetWidth - 2)
                                    { o.style.left = (sbw - o.offsetWidth - 2) + "px"; }
                                    else
                                    { o.style.left = e.clientX - relLeft + "px"; }
            if (e.clientY - relTop <= 1)
            { o.style.top = 1 + "px"; }
            else if (e.clientY - relTop >= bh - o.offsetHeight - 30)
            { o.style.top = (bh - o.offsetHeight) + "px"; }
            else
            { o.style.top = e.clientY - relTop + "px"; }
        }
        document.onmouseup = function () {
            if (!o) return; if (!window.captureEvents)
            { o.releaseCapture(); }
            else
            { window.releaseEvents(Event.MOUSEMOVE | Event.MOUSEUP); }
            var o1 = document.getElementById(Id); if (!o1)
            { return; }
            var l0 = o.offsetLeft; var t0 = o.offsetTop; var l = o1.offsetLeft; var t = o1.offsetTop; MyMove.Move_e(Id, l0, t0, l, t, T); document.body.removeChild(o); o = null;
        }
    }
    this.Move_e = function (Id, l0, t0, l, t, T) {
        if (typeof (window["ct" + Id]) != "undefined")
        { clearTimeout(window["ct" + Id]); }
        var o = document.getElementById(Id); if (!o) return; var sl = st = 8; var s_l = Math.abs(l0 - l); var s_t = Math.abs(t0 - t); if (s_l - s_t > 0) {
            if (s_t)
            { sl = Math.round(s_l / s_t) > 8 ? 8 : Math.round(s_l / s_t) * 6; }
            else
            { sl = 0; }
        }
        else {
            if (s_l)
            { st = Math.round(s_t / s_l) > 8 ? 8 : Math.round(s_t / s_l) * 6; }
            else
            { st = 0; }
        }
        if (l0 - l < 0)
        { sl *= -1; }
        if (t0 - t < 0)
        { st *= -1; }
        if (Math.abs(l + sl - l0) < 52 && sl)
        { sl = sl > 0 ? 2 : -2; }
        if (Math.abs(t + st - t0) < 52 && st)
        { st = st > 0 ? 2 : -2; }
        if (Math.abs(l + sl - l0) < 16 && sl)
        { sl = sl > 0 ? 1 : -1; }
        if (Math.abs(t + st - t0) < 16 && st)
        { st = st > 0 ? 1 : -1; }
        if (s_l == 0 && s_t == 0)
        { return; }
        if (T)
        { o.style.left = l0 + "px"; o.style.top = t0 + "px"; return; }
        else
        {
            if (Math.abs(l + sl - l0) < 2)
            { o.style.left = l0 + "px"; }
            else
            { o.style.left = l + sl + "px"; }
            if (Math.abs(t + st - t0) < 2)
            { o.style.top = t0 + "px"; }
            else
            { o.style.top = t + st + "px"; }
            window["ct" + Id] = window.setTimeout("MyMove.Move_e('" + Id + "', " + l0 + " , " + t0 + ", " + (l + sl) + ", " + (t + st) + "," + T + ")", 1);
        }
    }
}
function wpa_count() {

    var body = document.getElementsByTagName('body').item(0); var img = document.createElement('img'); var now = new Date(); img.src = "http://bizapp.qq.com/cgi/wpac?kfguin=" + kfguin + "&ext=0" + "&time=" + now.getTime() + "ip=172.23.30.15&"; img.style.display = "none"; body.appendChild(img);
}
//QQ的链接
var QQurl = function () {
    return "mqqwpa://im/chat?chat_type=wpa&uin=" + qqObj[indexT()].qnum + "&version=1&src_type=web&web_src=oicqzone.com";
}//http://wpa.qq.com/msgrd?V=1&uin=' + kfguin + '&site=www.hbzsb.cn&Menu=yes
var QQurl2 = function (index) {
    return "<a href=\"http://wpa.qq.com/msgrd?V=1&uin=" + qqObj[index].qnum + "&site=www.hbzsb.cn&menu=yes\"><img border=\"0\" height=\"16\" width=\"51\" src=http://wpa.qq.com/pa?p=1:" + qqObj[index].qnum + ":10  />" + qqObj[index].qnum + "</a>";
}
//电话的链接
var TelUrl = function () {
    //return 
    return "tel:" + qqObj[indexT()].tnum;
}

////页面导航QQ和电话初始化
//$(function () {
//    //$("#QQ_LI").empty().html("<a id=\"QQ_LI_A\" href=\"" + QQurl() + "\">QQ咨询</a>");
//    //$("#TEL_LI").empty().html("<a href=\"" + TelUrl() + "\">电话咨询</a>");
//    //$("#ADRESS_Sapn").empty().html("协议保障&nbsp;&nbsp;&nbsp;&nbsp;不过退费<br />");
//    //$("#TelModileName_Span").empty().html("<a href=\"tel:" + qqObj[0].znum + "\">" + qqObj[0].znum + '</a>(' + qqObj[0].name + ');&nbsp;<a href=\"tel:' + qqObj[1].znum + '\">' + qqObj[1].znum + '(' + qqObj[1].name + ')');
   
//})
//打开QQ方法
function Open_QQ() {
    window.open(QQurl(), '_blank');
}
//打开电话方法
function Open_Tel() {
    window.open(TelUrl(), '_blank');
}